package com.dpp.mapper;

import com.dpp.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper {
    @Select("SELECT * FROM activity WHERE activity_index=(select min(activity_index) from activity where activity_status=1)")
    Activity selectActivity(String openId);
    @Select(" SELECT * FROM activity WHERE activity_index=(SELECT min(activity_index) from activity where activity_id not in (${activityId} ) and activity_status=1)")
    Activity selectActivityID(String activityIds);
    @Select("SELECT * FROM activity  where activity_id = #{activityId} ")
    Activity selectByActivityID(Integer activityId);
}
